# from blind_watermark import WaterMark
# import json
#
#
# # bwm1 = WaterMark(password_img=1, password_wm=1)
# # bwm1.read_img('pic/ori_img.jpg')
# # wm = '@guofei9987 开源万岁！'
# # bwm1.read_wm(wm, mode='str')
# # bwm1.embed('output/embedded.png')
# # len_wm = len(bwm1.wm_bit)
# # print('Put down the length of wm_bit {len_wm}'.format(len_wm=len_wm))
#
# # def embed_watermark_str(password_img, password_wm, input_img_path, output_img_path):
# #     bwm1 = WaterMark(password_img=password_img, password_wm=password_wm)
# #     bwm1.read_img(input_img_path)
# #     wm = 'fuchuangsai'
# #     bwm1.read_wm(wm, mode='str')
# #     bwm1.embed(output_img_path)
# #     len_wm = len(bwm1.wm_bit)
# #     print('Put down the length of wm_bit {len_wm}'.format(len_wm=len_wm))
#
# def embed_watermark_str(input_img_path, output_img_path):
#     bwm1 = WaterMark(password_img=1, password_wm=1)
#     bwm1.read_img(input_img_path)
#     wm = 'fuchuangsai'
#     bwm1.read_wm(wm, mode='str')
#     bwm1.embed(output_img_path)
#     len_wm = len(bwm1.wm_bit)
#     print('Put down the length of wm_bit {len_wm}'.format(len_wm=len_wm))
#
#
# # bwm1 = WaterMark(password_img=1, password_wm=1)
# # wm_extract = bwm1.extract('output/embedded.png', wm_shape=len_wm, mode='str')
# # print(wm_extract)
#
# # def extract_watermark_str(password_img, password_wm, input_img_with_watermark_path):
# #     bwm1 = WaterMark(password_img=password_img, password_wm=password_wm)
# #     wm_extract = bwm1.extract('output/embedded.png', wm_shape=87, mode='str')
# #     print(wm_extract)
#
# def extract_watermark_str(input_img_with_watermark_path):
#     bwm1 = WaterMark(password_img=1, password_wm=1)
#     wm_extract = bwm1.extract(input_img_with_watermark_path, wm_shape=87, mode='str')
#     result = {'watermark': wm_extract}
#     return json.dumps(result)
#
